<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%">
<head>
<meta name="Generator" content="ALORK 20150428.01" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
<title><?php echo $this->_var['page_title']; ?></title>
<link rel="stylesheet" href="./public/my_style.css" />
<?php echo $this->smarty_insert_scripts(array('files'=>'./../js/region.js,./../js/jquery.js,./../js/jquery.json-1.3.js,./../js/jquery.flexslider-min.js')); ?>
<script type="text/javascript" src="public/iScroll_4.2.5.js"></script>
</head>
<body class="adapt">

<?php if ($this->_var['state'] > 0): ?>
<div id="mask"></div>
<div id="popup_glair">
  <?php if ($this->_var['state'] == 1): ?>
  
  <div class="null_glair">
    <img src="../mobile/images/null_glair_bg.png" alt="鸡蛋白">
    <div class="close"></div>
    <div class="go_index"></div>
    <a href="glair.php" title="鸡蛋白"></a>
  </div>
  <?php endif; ?>
</div>
<script type="text/javascript">
  $('#mask,#popup_glair .close,#popup_glair .go_index').click(function(){
    $('#mask,#popup_glair').hide();
  });
</script>
<?php endif; ?>






<div id="index"  class="<?php if ($this->_var['act'] == cate): ?> none <?php endif; ?>" >
    <div id="head" >
      <div class="head_left" onclick="window.location.href='index.php?act=cate'"></div>
      <div class="head_right" onclick="head_nav();"></div>
      <img src="../mobile/index/index_pic/head_bg.png" alt=""  width="100%" />
      <div id="head_nav" sytle="top:0px;">
        <a href="index.php">首页</a>
        <a href="index.php?act=cate">画材分类</a>
        <a href="flow.php">购物车</a>
        <a href="user.php?user=1">个人中心</a>
      </div>
    </div>
    <script>
    /*头部滚动跟随*/
    $(window).scroll(function() {
      var top = $('#top_top').height();
      var nows =  document.body.scrollTop;
      if(top){
          if (top<nows) {
            $('#head').css('position','fixed');
          }
          else{
            $('#head').css('position','relative');
          }
      }
      else{
        $('#banner').css('padding-top','0.43rem');
        $('#head').css('position','fixed');
      }
    });


    </script>

<!--     <div style="width:3.2rem; height:0.43rem; float:left;"></div> -->

    <div id="banner">
        <div class="flexslider"> 
          <ul class="slides">
            <?php $_from = $this->_var['ad_1']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'pic');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['pic']):
?>
            <li> <a href="<?php echo $this->_var['pic']['ad_link']; ?>"><img src="../data/afficheimg/<?php echo $this->_var['pic']['ad_code']; ?>"></a></li>
          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
          </ul>
        </div>
    </div>
    <div id="nav">
        <li><a href="freeplan.php" class="nav_5">画材全免</a></li>
        <li><a href="activity.php" class="nav_2">劲惠礼包</a></li>
        <li><a href="flash.php" class="nav_1">5折闪购</a></li>
        <li><a href="glair.php" class="nav_4">鸡蛋白</a></li>
    </div>
    <div id="banner_2">
        <a href="<?php echo $this->_var['ad_2']['0']['ad_link']; ?>" style="width:50%;"><img src="../data/afficheimg/<?php echo $this->_var['ad_2']['0']['ad_code']; ?>" width="100%"></a>
        <a href="<?php echo $this->_var['ad_2']['1']['ad_link']; ?>" style="border:none;"><img src="../data/afficheimg/<?php echo $this->_var['ad_2']['1']['ad_code']; ?>" width="100%"></a>
    </div>
    <div id="flash">
        <div class="top">
            <div class="title">五折闪购</div>
            <?php if ($this->_var['expect_start_time']): ?>
            <div class="time_box">距离开始 <span class="time" time="<?php echo $this->_var['expect_start_time']; ?>"></span> </div>
            <?php endif; ?>
            <?php if ($this->_var['expect_end_time']): ?>
            <div class="time_box">距离结束 <span class="time" time="<?php echo $this->_var['expect_end_time']; ?>"></span> </div>
            <?php endif; ?>


        </div>
        <div class="flash_box">
            <div class="flexslider" style="float: left; width: 100%; height: 100%; overflow: hidden;">
            <ul class="slides" styke="width:1000%">
              <?php $_from = $this->_var['promote_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'goods');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['goods']):
?>
              <li class="goods">
              <a href="flash.php">
                <div class="img">
                  <div class="img_ze">5折<br />封顶</div>
                  <img src="../<?php echo $this->_var['goods']['goods_thumb']; ?>" alt="" />
                </div>
                <div class="goods_note">
                  <div class="goods_name"><?php echo $this->_var['goods']['goods_name']; ?></div>
                  <div class="goods_price"><span style="font-size:14px;">￥</span><?php echo $this->_var['goods']['promote_price']; ?>    <span class="market_price"><span style="font-size:14px;">￥</span><?php echo $this->_var['goods']['market_price']; ?></span>  </div>
                </div>
              </a>
              </li>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            </ul>
            </div>
        </div>
    </div>
    <div class="index_banner">
      <a href="<?php echo $this->_var['ad_3']['0']['ad_link']; ?>">
        <img src="../data/afficheimg/<?php echo $this->_var['ad_3']['0']['ad_code']; ?>" alt="" />
      </a>
    </div>
    <div id="activities">
      <div class="top">热门活动</div>
      <div class="activities_banner">
        <div class="banner_1">
        <a href="<?php echo $this->_var['ad_4']['0']['ad_link']; ?>">
        <img src="../data/afficheimg/<?php echo $this->_var['ad_4']['0']['ad_code']; ?>" alt="" width="100%" />
        </a> 
        </div>
        <div class="banner_box">
          <div class="banner_2">
          <a href="<?php echo $this->_var['ad_4']['1']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_4']['1']['ad_code']; ?>" alt=""width="100%" />
          </a>
          </div>
          <div class="banner_3">
          <a href="<?php echo $this->_var['ad_4']['2']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_4']['2']['ad_code']; ?>" alt="" width="100%"/>
          </a>
          </div>
        </div>
      </div>
    </div>
    <div class="index_banner">
      <a href="<?php echo $this->_var['ad_3']['1']['ad_link']; ?>">
        <img src="../data/afficheimg/<?php echo $this->_var['ad_3']['1']['ad_code']; ?>" alt="" />
      </a>
    </div>
    <div id="cate">
      <div class="category_top">商品分类</div>
      <div class="index_category">
        <div class="category">
          <a  href="<?php echo $this->_var['ad_5']['5']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_5']['5']['ad_code']; ?>" alt="" width="100%"/>
          <div class="name">美术高考</div>
          </a>
        </div>
        <div class="category">
          <a  href="<?php echo $this->_var['ad_5']['2']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_5']['2']['ad_code']; ?>" alt="" width="100%"/>
          <div class="name">少儿专区</div>
          </a>
        </div>
      </div>
      <div class="index_category">
        <div class="category">
          <a  href="<?php echo $this->_var['ad_5']['3']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_5']['3']['ad_code']; ?>" alt="" width="100%"/>
          <div class="name">油画&丙烯&水彩</div>
          </a>
        </div>
        <div class="category">
          <a  href="<?php echo $this->_var['ad_5']['1']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_5']['1']['ad_code']; ?>" alt="" width="100%"/>
          <div class="name">岩彩&国画&书法</div>
          </a>
        </div>
      </div>
      <div class="index_category">
        <div class="category">
          <a  href="<?php echo $this->_var['ad_5']['4']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_5']['4']['ad_code']; ?>" alt="" width="100%"/>
          <div class="name">设计&动漫&插画</div>
          </a>
        </div>
        <div class="category">
          <a  href="<?php echo $this->_var['ad_5']['0']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_5']['0']['ad_code']; ?>" alt="" width="100%"/>
          <div class="name">教学专区</div>
          </a>
        </div>
      </div>
    </div>
      <div class="index_banner">
        <a href="<?php echo $this->_var['ad_3']['2']['ad_link']; ?>">
          <img src="../data/afficheimg/<?php echo $this->_var['ad_3']['2']['ad_code']; ?>" alt="" />
        </a>
      </div>
    <div id="brand">
      <div class="top">热销品牌</div>
      <div class="brand_box" id="wrapper" >
        <ul id="scroller" class="slides">
            <li class="brand_boxs">
              <div class="brand_son">
                <a href="search.php?keywords=美邦"><img src="./index/index_pic/brand/brand_1.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=辉柏嘉"><img src="./index/index_pic/brand/brand_2.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=波普"><img src="./index/index_pic/brand/brand_3.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=樱花"><img src="./index/index_pic/brand/brand_4.png" alt="" width="100%" /></a>
            </div>
            <div class="borders"></div>
            <div class="brand_son">
                <a href="search.php?keywords=雪山"><img src="./index/index_pic/brand/brand_5.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=马可"><img src="./index/index_pic/brand/brand_6.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=米娅"><img src="./index/index_pic/brand/brand_7.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=康颂"><img src="./index/index_pic/brand/brand_8.png" alt="" width="100%" /></a>
            </div>
            <div class="borders"></div>
            <div class="brand_son">
                <a href="search.php?keywords=马利" ><img src="./index/index_pic/brand/brand_9.png" alt="" width="100%" /></a>
            </div>          
            <div class="brand_son">
                <a href="search.php?keywords=凤凰"><img src="./index/index_pic/brand/brand_10.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=中华"><img src="./index/index_pic/brand/brand_11.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=古风"><img src="./index/index_pic/brand/brand_12.png" alt="" width="100%" /></a>
            </div>
            </li>
            <li class="brand_boxs">            
            <div class="brand_son">
                <a href="search.php?keywords=houch"><img src="./index/index_pic/brand/brand_13.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=尊爵"><img src="./index/index_pic/brand/brand_14.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=得力"><img src="./index/index_pic/brand/brand_15.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=大千"><img src="./index/index_pic/brand/brand_16.png" alt="" width="100%" /></a>
            </div>
            <div class="borders"></div>
            <div class="brand_son">
                <a href="search.php?keywords=施德楼"><img src="./index/index_pic/brand/brand_17.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=三菱"><img src="./index/index_pic/brand/brand_18.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=伦勃朗"><img src="./index/index_pic/brand/brand_19.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=新概念"><img src="./index/index_pic/brand/brand_20.png" alt="" width="100%" /></a>
            </div>
            <div class="borders"></div>
            <div class="brand_son">
                <a href="search.php?keywords=温莎"><img src="./index/index_pic/brand/brand_21.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=梵高"><img src="./index/index_pic/brand/brand_22.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=贝碧欧"><img src="./index/index_pic/brand/brand_23.png" alt="" width="100%" /></a>
            </div>
            <div class="brand_son">
                <a href="search.php?keywords=高尔乐"><img src="./index/index_pic/brand/brand_24.png" alt="" width="100%" /></a>
            </div>
            </li>
        </ul>
      </div>
    </div>
    <div id="recommend">
      <div class="top">更多推荐</div>
      <div class="recommend_goods_list">
            <?php $_from = $this->_var['recommend_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['item']):
?>
            <div class="recommend_goods">
              <a href="goods-<?php echo $this->_var['item']['goods_id']; ?>.html" class="goods_son">
              <div class="pic">
                <img src="../<?php echo $this->_var['item']['goods_thumb']; ?>" alt="" />
              </div>
              <div class="goods_name"><?php echo $this->_var['item']['goods_name']; ?></div>
              <div class="goods_price"><span style="font-size:12px;">￥</span><?php echo $this->_var['item']['shop_price']; ?> <span class="market_price">￥<?php echo $this->_var['item']['market_price']; ?></span></div>
              </a>
            </div>
            
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
      </div>
    </div>

<div id="index_bottom">
  <div class="bottom_list">
    <a href="index.php" style="color:#fff">触屏版</a>
    <a href="down.php?act=appdown">客户端</a>
    <a href="http://www.eggms.com">电脑版</a>
  </div>
  <div class="box">eggms.com  (粤ICP证14041678号)</div>
  <div class="box">鸡蛋美术，为梦想而破</div>
</div>
<?php echo $this->fetch('library/footer.lbi'); ?>
</div>




<div id="index_seach" class="index_head<?php if ($this->_var['act'] != cate): ?> none<?php endif; ?>">
    <div id="head">
        <div class="head_left" <?php if ($this->_var['act'] != cate): ?> onclick="$('#index_seach').hide();$('#index').show();$('#bottom').show();"<?php else: ?>
        onclick="history.back(-1);"
         <?php endif; ?>></div>
        <div class="head_content">
            <form name="searchForm" method="get" action="search.php" id="seach_from" onsubmit="return is_null(this) ">
                <input type="text" name="keywords" class="seach" placeholder="请输入关键词"/>
            </form>
        </div>
        <div class="head_right" onclick="$('#seach_from').submit();">搜索</div>
    </div>


 <div id="nav" style="margin-bottom:2px;"> 
        <div class="box"><a href="topic.php">话题</a></div>
        <div class="box"><a href="index.php?act=cate"  class="now">商品</a></div>
</div>

    <div id="cates">
      <div id="cate_left">
        <ul>
          <li <?php if ($this->_var['cat_id'] == 0): ?>class="now"<?php endif; ?>><a href="index.php?act=cate">品牌</a></li>
          <?php $_from = $this->_var['cat_layer1']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'cat');if (count($_from)):
    foreach ($_from AS $this->_var['cat']):
?>
          <li <?php if ($this->_var['cat']['cat_id'] == $this->_var['cat_id']): ?>class="now"<?php endif; ?>><a href="index.php?act=cate&id=<?php echo $this->_var['cat']['cat_id']; ?>"><?php echo $this->_var['cat']['cat_name']; ?></a></li>
          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </ul>
      </div>
      <div id="cate_right">
        
        <div>
			    <?php if ($this->_var['cat_id'] == 0): ?>
                <div class="material pinpai" style="padding-top:15px;">
                    <ul>
						<?php $_from = $this->_var['brand_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'brand');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['brand']):
?>
                        <li>
                            <a href="search.php?keywords=<?php echo $this->_var['brand']['brand_name']; ?>"><img src="./index/index_pic/brand/brand_<?php echo $this->_var['brand']['brand_id']; ?>.jpg"/></a>
                            <div><a href="search.php?keywords=<?php echo $this->_var['brand']['brand_name']; ?>"><?php echo $this->_var['brand']['brand_name']; ?></a></div>
                        </li>
						<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                    </ul>
                </div>
				<?php else: ?>
				<?php $_from = $this->_var['cat_layer2']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'cat');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['cat']):
?>
                <div class="material">
                    <p><a href="<?php echo $this->_var['cat']['url']; ?>"><?php echo $this->_var['cat']['cat_name']; ?></a></p>
                    <ul>
						<?php $_from = $this->_var['cat']['sub_cat']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'catson');if (count($_from)):
    foreach ($_from AS $this->_var['catson']):
?>
                        <li>
							<a href="<?php echo $this->_var['catson']['url']; ?>"><img src="./index/category_pic/<?php echo $this->_var['catson']['id']; ?>.jpg"/></a>
                            <div><a href="<?php echo $this->_var['catson']['url']; ?>"><?php echo $this->_var['catson']['name']; ?></a></div>
                        </li>
						<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                    </ul>
                </div>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				<?php endif; ?>
                 
              </div>
        </div>

        
        </div>
        
      </div>
      <script>

      </script>


				<!--
                <a href="search.php?keywords=美邦"><img src="./index/index_pic/brand/brand_1.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=辉柏嘉"><img src="./index/index_pic/brand/brand_2.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=波普"><img src="./index/index_pic/brand/brand_3.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=樱花"><img src="./index/index_pic/brand/brand_4.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=雪山"><img src="./index/index_pic/brand/brand_5.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=马可"><img src="./index/index_pic/brand/brand_6.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=米娅"><img src="./index/index_pic/brand/brand_7.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=康颂"><img src="./index/index_pic/brand/brand_8.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=马利"><img src="./index/index_pic/brand/brand_9.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=凤凰"><img src="./index/index_pic/brand/brand_10.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=中华"><img src="./index/index_pic/brand/brand_11.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=古风"><img src="./index/index_pic/brand/brand_12.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=houch"><img src="./index/index_pic/brand/brand_13.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=尊爵"><img src="./index/index_pic/brand/brand_14.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=得力"><img src="./index/index_pic/brand/brand_15.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=大千"><img src="./index/index_pic/brand/brand_16.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=施德楼"><img src="./index/index_pic/brand/brand_17.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=三菱"><img src="./index/index_pic/brand/brand_18.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=伦勃朗"><img src="./index/index_pic/brand/brand_19.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=新概念"><img src="./index/index_pic/brand/brand_20.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=温莎"><img src="./index/index_pic/brand/brand_21.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=梵高"><img src="./index/index_pic/brand/brand_22.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=贝碧欧"><img src="./index/index_pic/brand/brand_23.png" alt="" width="100%" /></a>
                <a href="search.php?keywords=高尔乐"><img src="./index/index_pic/brand/brand_24.png" alt="" width="100%" /></a>
                -->




</div>

<script>
function is_null(){
var value=$('.seach').val();
if (value==null||value=="") {
alert('请输入关键字');
return false;
};
}

function head_nav(){
  var height=$('#head').height();
  var head_bg=$('.head-bg').height();
   // $('#head_nav').css('top',height+head_bg);
  $('#head_nav').toggle();
}


$(window).load(function() {
  $('.flexslider').flexslider({
    animation: "slide",
    slideDirection:'horizontal',
    controlNav: true,
    animationLoop: true,
    slideshow: true,
    navigation:false,
  });
});

  $('#wrapper').flexslider({
    animation: "slide",
    controlNav: false,
    animationLoop: false,
    slideshow: false,
    navigation:false,
  });
/*切换到搜索页函数*/
function search(){
  $("#index").hide();
  $("#bottom").hide();
  $("#index_seach").show();
  var height = $(window).height()-88;
  $("#cate_left").height(height);
  $("#cate_right").height(height);
  $("#cates").height(height);
  cate_right.refresh();
  cate_left.refresh();

}  
/*
var cate_left;
  cate_left = new iScroll('cate_left', {
    snap  :false,
    hScroll  :false,
    momentum: false,
    vScrollbar :false,
    hScrollbar: false,
    topOffset: 0,
   });
var cate_right;
cate_right = new iScroll('cate_right', {
  snap  :false,
  momentum: false,
  vScrollbar :false,
  hScrollbar: false,
  hScroll  :false,
  topOffset: 0,
 });
*/
<?php if ($this->_var['act'] == cate): ?>
  var height = $(window).height()-88;
  $("#cate_left").height(height);
  $("#cate_right").height(height);
  $("#cates").height(height);
  cate_right.refresh();
  cate_left.refresh();
<?php endif; ?>



/*点击分类显示*/

$("#cate_left").find('li').click(function(){
  var num = $(this).index();
  $(this).addClass('now').siblings().removeClass('now');
  $(".cate_son").eq(num).removeClass('none').siblings().addClass('none');

  cate_right.refresh();



});




</script>

<script type="text/javascript">
            var inter=setInterval(function(){
                $(".time").each(function(){
                   var time=$(this).attr('time')-1;
                   $(this).html( datetime(time));
                   $(this).attr('time',time);
                 });
              },1000);
          function datetime(time1){
            if(time1 < 0) time1 = 0;
            var time = time1;
            var H='';
            var M='';
            var T='';


            if(Math.floor((time/3600)%24)!=0){
              H=Math.floor((time/3600)%24);
              if(H<10){
                 H="<span>0</span><span>"+H+"</span>:";
              }
              else{
                H="<span>"+Math.floor(H/10)+"</span>"+"<span>"+Math.floor(H%10)+"</span>:";
              }
            }else{
              H="<span>0</span><span>0</span>:";
            }



            if(Math.floor((time%(3600))/60)!=0){
              M=Math.floor((time%(3600))/60);
              if(M<10){
                 M="<span>0</span><span>"+M+"</span>:";
              }
              else{
                M="<span>"+Math.floor(M/10)+"</span>"+"<span>"+Math.floor(M%10)+"</span>:"
              }
            }else{
              M="<span>0</span><span>0</span>:";
            }

            if(Math.floor((time%(3600))%60)!=0){
              T=Math.floor(time%(3600)%60);
              if(T<10){
                 T="<span>0</span><span>"+T+"</span>";
              }
              else{
                T="<span>"+Math.floor(T/10)+"</span>"+"<span>"+Math.floor(T%10)+"</span>"
              }
            }else{
              T="<span>0</span><span>0</span>";
            }

            return H+M+T;
          }
</script>

<script type="text/javascript">
    /*字体大小 自适应 rem单位*/
    function auto(){
        var width = $('body').width();
        var font_size = 20*(width/320);
        var font_size2 = (width/320)*625+'%';
        $('body').css('font-size',font_size);
        $('html').css('font-size',font_size2);
    }
        auto();
    /*浏览器横屏坚屏改变时也运行函数*/
    window.onorientationchange = function() {
        auto();
    };
    /* 浏览器窗口发生改变也运行函数*/
    window.resize=function(){
        auto();
    };
</script>
</body>
</html>
<script>
    var cate_right=document.getElementById('cate_right');
    cate_right.style.overflow='scroll';
</script>